<?php
namespace app\home\controller;
use \think\Db;


class About extends \think\Controller
{
    public function index(){
        //关于我们类别
        $category = Db::table('baode_article_category')->where('title','关于我们')->find();
        $categoryArr = Db::table('baode_article_category')->where('pid',intval($category['id']))->select();
        
        //详情
        input('category_id') and $category_id = input('category_id') or $category_id = $categoryArr[0]['id'];
        $category_id and $aboutArr = Db::table('baode_article')->where('category_id',intval($category_id))->find();
        return $this->allFetch(get_defined_vars());
    }
    
    
}
